//
//  Design_PatternsTests.m
//  Design PatternsTests
//
//  Created by 王王 on 2016/12/10.
//  Copyright © 2016年 ying. All rights reserved.
//

#import <XCTest/XCTest.h>
#import "WYXDuck.h"
#import "WYXRubberDuck.h"
#import "WYXNormalDuck.h"

@interface Design_PatternsTests : XCTestCase

@end

@implementation Design_PatternsTests

- (void)setUp {
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testExample {
    // This is an example of a functional test case.
    // Use XCTAssert and related functions to verify your tests produce the correct results.
    
}
// 测试正常鸭子
- (void)testNormalDuck{
    WYXNormalDuck *normalDk = [[WYXNormalDuck alloc] init];
    [normalDk swim];
    [normalDk adorable];
    [normalDk performFlyBehavior];
    [normalDk performQuackBehavior];
}

// 测试橡皮鸭
- (void)testRubberDuck{
    WYXRubberDuck *rubberDk = [[WYXRubberDuck alloc] init];
    [rubberDk swim];
    [rubberDk adorable];
    [rubberDk performFlyBehavior];
    [rubberDk performQuackBehavior];

}
- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

@end
